//---------------------------------------------------------------------------
#ifndef diffH
#define diffH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Menus.hpp>
#include <vcl\Dialogs.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>

#include <exception>
#include <stdio.h>
#include <math.h>
#include <io.h>
#include <string.h>
#include <values.h>
#include <except.h>
#include <iostream.h>

#include "qqq.h"
#include "z.h"
#include "GrClient.h"
#include "Choose_s.h"
#include "readva1.h"
#include "read_pa2.h"
#include "sys_par.h"
#include "ReadSr1.h"
#include "calcul1.h"
#include "bif_form.h"
#include "xy_show.h"

#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class  TForm1 : public TForm
{
__published:	// IDE-managed Components
	TMainMenu *MainMenu1;
	TMenuItem *N1;
	TMenuItem *N2;
	TMenuItem *N3;
	TMenuItem *N4;
	TMenuItem *N5;
	TMenuItem *N6;
	TMenuItem *N7;
	TOpenDialog *OpenQQQ;
	TLabel *Label1;
	TMainMenu *MenuGraph;
	TMenuItem *XYZ1;
	TMenuItem *XY1;
	TMenuItem *XZ1;
	TMenuItem *YZ1;
	TMenuItem *UV1;
	TMenuItem *U1U21;
	TMenuItem *U1V1;
	TMenuItem *U2V1;
	TMenuItem *N8;
	TMenuItem *N9;
	TMenuItem *N10;
	TMemo *Memo1;
        TMenuItem *N11;
	TMenuItem *N13;
        TMenuItem *XYZ;
    TMenuItem *UV;
        TPanel *SpeedPanel;
    TSpeedButton *OpenBtn;
        TStatusBar *StatusBar1;
    TSpeedButton *RunBtn;
    TSpeedButton *ExitBtn;
    TSpeedButton *ParamBtn;
    TSpeedButton *GraphBtn;
        TSpeedButton *ParUtBtn;
        TMenuItem *N14;
        TMenuItem *N15;
        TMenuItem *N16;
	void __fastcall N5Click(TObject *Sender);
	void __fastcall N2Click(TObject *Sender);
	void __fastcall N6Click(TObject *Sender);
	void __fastcall N8Click(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall XY1Click(TObject *Sender);
	void __fastcall XZ1Click(TObject *Sender);
	void __fastcall YZ1Click(TObject *Sender);
	void __fastcall U1U21Click(TObject *Sender);
	void __fastcall U1V1Click(TObject *Sender);
	void __fastcall U2V1Click(TObject *Sender);
	void __fastcall N10Click(TObject *Sender);
	void __fastcall N9Click(TObject *Sender);
 void __fastcall ReadMaxValue(); //Reading max value for drawing graphics
        void __fastcall N11Click(TObject *Sender);
	void __fastcall N13Click(TObject *Sender);
        void __fastcall XYZClick(TObject *Sender);
        void __fastcall UVClick(TObject *Sender);
        void __fastcall FormResize(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall N15Click(TObject *Sender);
        void __fastcall N16Click(TObject *Sender);


private:	// User declarations



public:		// User declarations
  void LabCreatGrClient(TGrClient **Client, char *Title,int x1, int y1, int x2,
                  int y2, TFont *Font, TColor ColFon);
double MinVal(int k, double *X);
double MaxVal(int k, double *X);
double CreateStepOrigin(double value);
/*
void read_par(int nz, char *str);
void zag (void);
double expression(char *postfix, double v[]);
void DPOLRT(double *,int,double *, double *);
void wprav(double x,double V[],double W[]);
void har(void);
void wk(int L,float* G);
void ab(int L,float AA[],float BB[]);
int inf2post(char *infix, char *postfix);
int Def(int *priornew, char c);
int pr2obr(void);
float det( int n, int *pr, int *pc, float *pa, int N);
void ftoa( int all, int prec, char* kuda, float what );
void save_par( char *f_name, char *name, char *num);
void load_int_par( char *f_name, char *name, char *num);
void load_float_par( char *fname, char *name, char *num);
void par( char * f_name , int n );
float f(float);
void prm(void);
void sr(void);
void sob();
void otper(float ,float *,float *,float *,float *);
int prog(int,int,int,float *,float *);
void prper(float *,float *,float *);
int tpr(float *, float *);
void obper(float *, float *, float *);
int tobr(float *, float *);
int otobr( float *,float *,float *,float *);
void mmatr(float *, int , float a[][3], float *);
int drkgs(double *PRMT,double *Y,double *DERY,int dim_1);
void Outp(double x, double *y);
void bif(float *ff,float *b);
void ReadOwnPar();
double NoLinPart(int num_str, int num_zad);

    */
int View_flag, SPECIFY_SR_flag, CALCUL_flag, GRAPH_flag;
	__fastcall TForm1(TComponent* Owner);
// float *AA, *BB, *G;
 TGrClient *pPopup;
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;

extern float *AA, *BB, *G;
//---------------------------------------------------------------------------
#endif

